package com.cat.springbootdemoidea.controller;


import com.cat.springbootdemoidea.entity.Product;
import com.cat.springbootdemoidea.service.IProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zss
 * @since 2020-09-16
 */
@RestController
@RequestMapping("/product")
public class ProductController {
    @Autowired
    private IProductService iProductService;

    /**
     * 测试mybatis用法
     * @param id
     * @return
     */
    @RequestMapping("/getProductByMybatis")
    public Product getProductByMybatis(String id){
        Product product = iProductService.getProductByMybatis(id);


        return  product;
    }

}
